CMAKE_MINIMUM_REQUIRED(VERSION 3.0...3.20)
PROJECT(gear-lib)

INCLUDE_DIRECTORIES(. ${POSIX_INCLUDE_DIR} ${DARRAY_INCLUDE_DIR} ${THREAD_INCLUDE_DIR})

LIST(APPEND SOURCE_FILES libgevent.c)

IF (DEFINED OS_LINUX)
LIST(APPEND SOURCE_FILES epoll.c libgevent.c poll.c select.c)
ELSEIF (DEFINED OS_WINDOWS)
LIST(APPEND SOURCE_FILES wepoll.c)
ENDIF ()

ADD_LIBRARY(gevent ${SOURCE_FILES})
